package org.example.dbcompare.model.result;

import lombok.Data;
import java.util.List;

/**
 * @author wuyong
 * @date 2025/10/30
 */
@Data
public class SqlExecutionResult {
    private Integer totalCount=0;
    private Integer successCount=0;
    private Integer failCount=0;
    public SqlExecutionResult(List<SqlExecutionItem> sqlExecutionItems){
        totalCount=sqlExecutionItems.size();
        for (SqlExecutionItem sqlExecutionItem : sqlExecutionItems) {
            if(sqlExecutionItem.isSuccess()){
                successCount++;
            }else{
                failCount++;
            }
        }
    }
}
